<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"

      xmlns:f="http://java.sun.com/jsf/core">
    <ui:composition template="layout.xhtml">
        <ui:define name="body">
            <h2>Editar Questionário</h2>
            <p:panel  style="width: 100%; background: none; border: none;">
                <h:form id="form" acceptcharset="utf-8">
                    <p:growl id="msg" life="3000"/>
                        <p class="subtitle">Novo Título</p>
                            <h:panelGrid columns="2">
                                <p:outputLabel value="Título :" style=" float: right; color: black; font-size: 12px; font-family: sans-serif"/>
                                <p:inputText id="title" value="#{managerEditQuestionnaire.questionnaire.titulo}" title="Adicione um título para o Questionário" size="50"/>
                                <p:outputLabel value="Categoria :" style=" float: right; color: black; font-size: 12px; font-family: sans-serif"/>
                                <p:selectCheckboxMenu value="#{managerEditQuestionnaire.selectCategory}" label="" converter="categoryConverter" 
                                                      panelStyle="width:319px"
                                                      style="width: 319px; height: 25px;">    
                                    <f:selectItems value="#{managerEditQuestionnaire.lstCategorys()}" var="lcs" itemLabel="#{lcs.name}" />  
                                </p:selectCheckboxMenu>
                            </h:panelGrid>

                    <center>
                        <p:commandButton value="Atualizar" icon="ui-icon-document" style="font-size: 12px; font-family: sans-serif;" actionListener="#{managerEditQuestionnaire.update()}" update="@form, msg"/>
                        <p:commandButton value="Cancelar" icon="ui-icon-close" style="font-size: 12px; font-family: sans-serif;" actionListener="#{managerRedirect.redirect('viewQuestionnaire.xhtml')}" immediate="true"/>
                    </center>
                </h:form>
            </p:panel>
        </ui:define>
    </ui:composition>
</html>


